Skip to main content

mobilePickMedia

Type

command

Summary

Allows the user to select iPod media items on iOS or start a media selector on Android.

Syntax

mobilePickMedia [<multiple>] [, &quot; <music> &quot;] [, &quot; <podCast> &quot;] [, &quot; <audioBook> &quot;] [, &quot; <anyAudio> &quot;]

Description

Allows the user to select media items from the iPod library or Android file system and returns paths to the media items.

Use the mobilePickMedia command to display a native iOS media picker that allows the user to select iPod media items. On Android, this command allows you to select from possible media picker applications that can be used to select media items.

The mobilePickMedia command can be launched, allowing the user to select either one or multiple media items on iOS. You can only select on item on Android. If the user is allowed to select one media item, the iOS media picker is dismissed automatically, once the item is selected, the behavior on Android is application dependent. If the user is allowed to select multiple items on iOS, the user has to select the Done button, once all of the selections have been made.

The remaining arguments specify the type of media items the user should be allowed to select from the iPod library. On Android, it is not necessary to specify any arguments. The application that is launched is in control of the audio media types that are to be selected.

note

mobilePickMedia does not return anything for m4p files or iCloud files that are not physically on the device, even if they are displayed in the picker itself.

note

On iOS, mobilePickMedia returns references to the iTunes data store on the iOS device. These media references can only be played with the mobilePlaySoundOnChannel command.

note

mobilePickMedia is not available on the iOS simulator.

Parameters

NameTypeDescription

multiple

boolean

A boolean that specifies if the user is allowed to select one or multiple media items on iOS. You can only select one item at a time on Android. The default is false.

music

Specifies that the user should be allowed to select music items on iOS.

podCast

Specifies that the user should be allowed to select pod casts on iOS.

audioBook

Specifies that the user should be allowed to select audio books on iOS.

anyAudio

Specifies that the user should be allowed to select any audio item on iOS.

Examples

mobilePickMedia
mobilePickMedia true
mobilePickMedia "music", "audioBook"
local tResult, tLine
mobilePickMedia true, "podCast"
put the result into tResult
repeat for each line tLine in tResult
play tLine
end repeat

command: mobilePlaySoundOnChannel, mobilePick, mobilePickDate

Compatibility and Support

Introduced

LiveCode 5.0.1

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?